<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>My Blog</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
</head>
<body>
<header class="container page-header">
    <h1>My blog
        <small> —— by akashi</small>
    </h1>
</header>
<div class="container page-body">
    <div class="col-md-9" role="main">
        <div class="body-main">
            {% for article in article_list %}
                <div>
                    <h3>
                        <a href="/blog/detail/{{ article.article_id }}">{{ article.title }}</a>
                    </h3>
                    <p>{{ article.brief_content }}</p>
                </div>
            {% endfor %}
        </div>
        <div class="container body-footer clo-md-4 col-md-offset-3">
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li>
                        <a href="/blog/index?page={{ previous }}" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    {%  for num in page_num %}
                    <li><a href="/blog/index?page={{ num }}">{{ num }}</a></li>
                    {% endfor %}
                    <li>
                        <a href="/blog/index?page={{ next }}" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
    <div class="col-md-3" role="complementary">
        <div>
            <h3>最新文章</h3>
            {% for article in top3_article_list %}
                <h5><a href="/blog/detail/{{ article.article_id }}">{{ article.title }}</a></h5>
            {% endfor %}
        </div>
    </div>
</div>

</body>
</html>